<?php
/*
Primary Author: Derek Shue
Secondary: Alex Arey
Documentation: Cheng Yi
Updated: 12/10/2011
Module Description: The Student Profile form is used by Students to add/edit their viewable profile.
*/
class Application_Form_StudentProfile extends Zend_Form
{

    public function init()
    {
        $this->setMethod('post');

		$lenvalid = new Zend_Validate_StringLength(array('max' => 9, 'min'=>9));
		$emailLenValid = new Zend_Validate_StringLength(array('max' => 100));
		
		$this->addElement('text','PID',array(
	    'label' => 'PID:',
	    'filters' => array('StringTrim'),
	    'validators' => array('Digits', $lenvalid),
	    'required' => True,
	    )
	);			
		
	$this->addElement('text','FIRSTNAME',array(
	    'label' => 'First Name:',
	    'filters' => array('StringTrim'),
	    'required' => True,
	    )
	);
	
		$this->addElement('text','MIDDLENAME',array(
	    'label' => 'Middle Name:',
	    'filters' => array('StringTrim'),
	    )
	);
	
	$this->addElement('text','LASTNAME',array(
	    'label' => 'Last Name:',
	    'filters' => array('StringTrim'),
	    'required' => True,
	    )
	);
	
	$this->addElement('text','EMAIL',array(
	    'label' => 'Email:',
	    'filters' => array('StringTrim'),
	    'validators' => array('EmailAddress',$emailLenValid),
	    'required' => True,
	    )
	);
	$phonevalid = new Zend_Validate_Regex(array('pattern' => '/^\(\d\d\d\) ?\d\d\d-\d\d\d\d$/'));
	$this->addElement('text','PHONE',array(
	    'label' => 'Phone: (###) ###-####',
	    'filters' => array('StringTrim'),
	    'validators' => array($phonevalid),
	    'required' => True,
	    )
	);
	
	$this->addElement('text','MAJOR',array(
	    'label' => 'Major:',
	    'filters' => array('StringTrim'),
	    'required' => True,
	    )
	);
	
	$this->addElement('text','STUDENTSTATE',array(
	    'label' => 'State:',
	    'filters' => array('StringTrim'),
	    'required' => True,
	    )
	);
	
	$this->addElement('text','HOWHEAR',array(
	    'label' => 'How did you hear about the program?',
	    'filters' => array('StringTrim'),	
	    )
	);
	
	$this->addElement('submit','submit',array(
	    'label' => 'submit',
	    )
	);
	

	
	
	}


}

